{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 9.1 K-means 聚类"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "假设我们有一组 $D$ 维的数据 $\\{\\mathbf x_1,\\dots,\\mathbf x_N\\}$，我们的目的是将其分成 $K$ 类。\n",
    "\n",
    "直觉上，我们认为同一类数据点的类内距离应当比不同类数据点的类间聚类要小。因此，我们引入一组 $D$ 维向量 $\\mathbf \\mu_k, k=1,\\dots,K$，$\\mathbf\\mu_k$ 表示属于一个第 $k$ 类的样例（在之后的推导中知道，我们可以将 $\\mathbf \\mu_k$ 认为是每个类的中心点）。\n",
    "\n",
    "目标是找到数据点分别隶属的类，以及一组向量$\\{\\mu_k\\}$,使得每个数据点和与它最近的向量\n",
    "$\\mu_k$之间的距离的平方和最小,$r_{nk}\\in\\{0,1\\}$\n",
    "\n",
    "引入二值指示变量$r_{nk}\\in\\{0,1\\}$，1-of-k表示方式,目标函数:\n",
    "$$J=\\sum_{n=1}^N\\sum_{k=1}^Nr_{nk}\\Vert x_n-\\mu_k\\Vert^2$$\n",
    "\n",
    "首先，为$\\mu_k$选择初始值\n",
    "\n",
    "第一阶段，关于$r_{nk}$最小化J,保持$\\mu_k$固定\n",
    "$$r_{nk}=\\begin{cases}1&if& k=argmin_j\\Vert x_n-\\mu_j\\Vert^2\\\\0&otherwise\\end{cases}$$\n",
    "第二阶段，考虑$r_{nk}$固定时，关于$\\mu_k$最优化,令J对$\\mu_k$求导可得:\n",
    "$$\\mu_k=\\frac{\\sum_nr_{nk}x_n}{\\sum_nr_{nk}}$$\n",
    "即令$\\mu_k$等于类别k的所有数据点的均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append(r\"../\")\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from prml.clusterings import KMeans\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(600, 2)\n"
     ]
    }
   ],
   "source": [
    "# training data\n",
    "x1 = np.random.normal(size=(200, 2))\n",
    "x1 += np.array([-3, -3])\n",
    "x2 = np.random.normal(size=(200, 2))\n",
    "x2 += np.array([3, -3])\n",
    "x3 = np.random.normal(size=(200, 2))\n",
    "x3 += np.array([0, 3])\n",
    "x_train = np.vstack((x1, x2, x3))\n",
    "print(x_train.shape)\n",
    "x0, x1 = np.meshgrid(np.linspace(-10, 10, 100), np.linspace(-10, 10, 100))\n",
    "x = np.array([x0, x1]).reshape(2, -1).T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARMAAAD8CAYAAABUzEBbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4HMX5xz/vXlO1bLn3jo17wzZgwHTbmOYAARNCSwgE\nAiEQSCAJJISQkPCjdwKBEHo1xhQbMMXGuHdbttyrXNV1def3x56kO91K1kl3ap7P8+jR3e7s7Kyt\n+97MO28RpRQajUZTX4zGHoBGo2kZaDHRaDQJQYuJRqNJCFpMNBpNQtBiotFoEoIWE41GkxASIiYi\n8qKI7BOR1RHHskVktohsDP9uU821k0QkR0RyReR3iRiPRqNpeBI1M/kPMKnKsd8BXyil+gNfhN9H\nISIO4ElgMjAIuExEBiVoTBqNpgFJiJgopb4BDlU5fD7wcvj1y8AFNpeOBXKVUpuVUn7gjfB1Go2m\nmeFMYt8dlVJ7wq/3Ah1t2nQFdkS83wmMs+tMRK4DrgNIT08bPWBAnwQOVaPRRLJ06eoDSqn28VyT\nTDGpQCmlRKRefvtKqeeA5wBGjx6qvl/wQULGptFoYvG4+22L95pk7ubkiUhngPDvfTZtdgHdI953\nCx/TaDTNjGSKyQzgyvDrK4EPbd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nzKxyHTaAFeAycCvXa0yu5TrVPGvyjHTttHWOulTTTAqM7tviXQF+RMTPiPgLvCDVywYkIj4Af44c\n7hx1qaaZTHAB2G29/9fofk3uS/qS/37WnKQeY23aAngv6VOOe4zJ1FGXxryyOTNZ1Oh+3yadJ/AE\nWCN9UdeAR8Dtxa3OOrgaEXuSzgHvJH3Pv/KjclzUpTGoZjLn0f3BmPY8JT0FXs15OfNUXW26iIi9\n/LwvaZu0rRtLM+kcdRnDNmfa0f0q5MI1Vkk3nmv1Ebgk6aKkk6Qb5Ts9r6kISacknW5eA9epu1ZH\ndY66DOqfySSSVoF14CxpdP9zRNyIiG+SmtH9A1qj+5V6KGmJtM35Bdztdzmzi4gDSfeAt8AJYDNH\nLcbgPLAtCdJ19Dwi3vS7pNlI2gKWgTM5HvOAFG15KekO8Bu4eezneJzezEoYwzbHzAbAzcTMinAz\nMbMi3EzMrAg3EzMrws3EzIpwMzGzIg4Bi5k9wef9iGkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f4a45fdbc88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "kmeans = KMeans(n_clusters=3)\n",
    "kmeans.fit(x_train)\n",
    "cluster = kmeans.predict(x_train)\n",
    "plt.scatter(x_train[:, 0], x_train[:, 1], c=cluster)\n",
    "plt.scatter(kmeans.centers[:, 0], kmeans.centers[:, 1], s=200, marker='X', lw=2, c=['purple', 'cyan', 'yellow'], edgecolor=\"white\")\n",
    "plt.contourf(x0, x1, kmeans.predict(x).reshape(100, 100),alpha=0.15)\n",
    "plt.xlim(-10, 10)\n",
    "plt.ylim(-10, 10)\n",
    "plt.gca().set_aspect('equal', adjustable='box')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(600,)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kmeans.predict(x_train).shape"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
